package com.lc.ck.controller;

import com.lc.ck.common.Result;
import com.lc.ck.entity.Menu;
import com.lc.ck.entity.User;
import com.lc.ck.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/menu")
public class MenuController {
    @Autowired
    private MenuService menuService;
    @GetMapping("/list")//账号唯一验证
    public Result list(@RequestParam String  roleId){
        List list =  menuService.lambdaQuery().like(Menu::getMenuright,roleId).list();
        return Result.suc(list);//当有数据时传回list数据，前端将接受200
    }

}
